<template>
    <n-card :title="data.title" @click="clickHandle(data.targethref)" hoverable>
        {{ data.content }}
        <template #header-extra>
            来源：{{ data.from }}
        </template>
        <template #footer>
            <n-icon>
                <Click></Click>
            </n-icon>
            {{ data.viewcount }}
        </template>
    </n-card>
</template>


<script setup lang="ts">
import { NCard, NIcon, NSpace } from "naive-ui";
import { CursorClick24Regular as Click } from "@vicons/fluent";

const props = defineProps(["data"]);

function clickHandle(url: string) {
    window.open(url);
}
</script>